package de.lot.action;

import de.lot.model.ProgramOfStudy;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

/**
 * Class to interact between UI and back-end for ProgramOfStudy component.
 *
 * @see ProgramOfStudy
 * @author Stefan Kohler <kohler.stefan@gmail.com>
 */
@Name("programOfStudyHome")
public class ProgramOfStudyHome extends EntityHome<ProgramOfStudy> {

    public void setProgramOfStudyId(Long id) {
        setId(id);
    }

    public Long getProgramOfStudyId() {
        return (Long) getId();
    }

    @Override
    protected ProgramOfStudy createInstance() {
        ProgramOfStudy programOfStudy = new ProgramOfStudy();
        return programOfStudy;
    }

    public ProgramOfStudy getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }
}
